All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.RepaintManager

java.lang.Object
   |
   +----com.sun.java.swing.RepaintManager

public class RepaintManager
extends Object

Constructor Index

 o RepaintManager()
Create a new RepaintManager instance.

Method Index

 o addDirtyRegion(JComponent, int, int, int, int)
Add a component in the list of components that should be refreshed.
 o addInvalidComponent(JComponent)
Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.
 o currentManager(Component)
Return the RepaintManager for the calling thread.
 o currentManager(JComponent)
 o getDirtyRegion(JComponent)
Return the current dirty region for a component.
 o getDoubleBufferMaximumSize()
 o getOffscreenBuffer(Component, int, int)
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager.
 o isCompletelyDirty(JComponent)
Convenience that returns true if aComponent will be completely painted during the next paintDirtyRegions().
 o isDoubleBufferingEnabled()
 o markCompletelyClean(JComponent)
Mark a component completely clean.
 o markCompletelyDirty(JComponent)
Mark a component completely dirty.
 o paintDirtyRegions()
Paint all of the components that have been marked dirty.
 o removeInvalidComponent(JComponent)
Remove a component from the list of invalid components.
 o setCurrentManager(RepaintManager)
Set the RepaintManager that should be used for the calling thread.
 o setDoubleBufferingEnabled(boolean)
 o setDoubleBufferMaximumSize(Dimension)
Set the maximum double buffer size.
 o toString()
 o validateInvalidComponents()
Validate all of the components that have been marked invalid.

Constructors

 o RepaintManager
 public RepaintManager()
Create a new RepaintManager instance. You rarely call this constructor. directly. To get the default RepaintManager, use RepaintManager.currentManager(JComponent) (normally "this").

Methods

 o currentManager
 public static RepaintManager currentManager(Component c)
Return the RepaintManager for the calling thread.

 o currentManager
 public static RepaintManager currentManager(JComponent c)
Returns:
currentManager((Component)c)
 o setCurrentManager
 public static void setCurrentManager(RepaintManager aRepaintManager)
Set the RepaintManager that should be used for the calling thread. aRepaintManager will become the current RepaintManager for the calling thread's thread group.

 o addInvalidComponent
 public synchronized void addInvalidComponent(JComponent invalidComponent)
Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor.

See Also:
isValidateRoot, removeInvalidComponent
 o removeInvalidComponent
 public synchronized void removeInvalidComponent(JComponent component)
Remove a component from the list of invalid components.

See Also:
addInvalidComponent
 o addDirtyRegion
 public synchronized void addDirtyRegion(JComponent c,
                                         int x,
                                         int y,
                                         int w,
                                         int h)
Add a component in the list of components that should be refreshed. If c already has a dirty region, the rectangle (x,y,w,h) will be unioned with the region that should be redrawn.

See Also:
repaint
 o getDirtyRegion
 public Rectangle getDirtyRegion(JComponent aComponent)
Return the current dirty region for a component. Return an empty rectangle if the component is not dirty.

 o markCompletelyDirty
 public void markCompletelyDirty(JComponent aComponent)
Mark a component completely dirty. aComponent will be completely painted during the next paintDirtyRegions() call.

 o markCompletelyClean
 public void markCompletelyClean(JComponent aComponent)
Mark a component completely clean. aComponent will not get painted during the next paintDirtyRegions() call

 o isCompletelyDirty
 public boolean isCompletelyDirty(JComponent aComponent)
Convenience that returns true if aComponent will be completely painted during the next paintDirtyRegions(). If computing dirty regions is expensive for your component, use this method and avoid computing dirty region if it return true.

 o validateInvalidComponents
 public void validateInvalidComponents()
Validate all of the components that have been marked invalid.

See Also:
addInvalidComponent
 o paintDirtyRegions
 public void paintDirtyRegions()
Paint all of the components that have been marked dirty.

See Also:
addDirtyRegion
 o toString
 public synchronized String toString()
Overrides:
toString in class Object
 o getOffscreenBuffer
 public Image getOffscreenBuffer(Component c,
                                 int proposedWidth,
                                 int proposedHeight)
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager. The buffer might be smaller than (proposedWidth,proposedHeight) This happens when the maximum double buffer size as been set for the receiving repaint manager.

 o setDoubleBufferMaximumSize
 public void setDoubleBufferMaximumSize(Dimension d)
Set the maximum double buffer size.

 o getDoubleBufferMaximumSize
 public Dimension getDoubleBufferMaximumSize()
 o setDoubleBufferingEnabled
 public void setDoubleBufferingEnabled(boolean aFlag)
 o isDoubleBufferingEnabled
 public boolean isDoubleBufferingEnabled()

All Packages  Class Hierarchy  This Package  Previous  Next  Index